package com.quanyan.comment.model.po;

import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * 系统表
 */
public class TbSystem implements Serializable {
    private Integer id;

    private String systemName;

    private String systemCode;

    private Byte status;

    private Integer founderId;

    private Date createTime;

    private Date updateTime;

    private String remark;

    private String founderName;

    private static final long serialVersionUID = 1L;

    public TbSystem(Integer id, String systemName, String systemCode, Byte status, Integer founderId, Date createTime, Date updateTime, String remark, String founderName) {
        this.id = id;
        this.systemName = systemName;
        this.systemCode = systemCode;
        this.status = status;
        this.founderId = founderId;
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.remark = remark;
        this.founderName = founderName;
    }


    public TbSystem() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getSystemName() {
        return systemName;
    }

    public void setSystemName(String systemName) {
        this.systemName = systemName;
    }

    public String getSystemCode() {
        return systemCode;
    }

    public void setSystemCode(String systemCode) {
        this.systemCode = systemCode;
    }

    public Byte getStatus() {
        return status;
    }

    public void setStatus(Byte status) {
        this.status = status;
    }

    public Integer getFounderId() {
        return founderId;
    }

    public void setFounderId(Integer founderId) {
        this.founderId = founderId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getFounderName() {
        return founderName;
    }

    public void setFounderName(String founderName) {
        this.founderName = founderName;
    }

    @Override
    public String toString() {
        return "TbSystem{" +
                "id=" + id +
                ", systemName='" + systemName + '\'' +
                ", systemCode='" + systemCode + '\'' +
                ", status=" + status +
                ", founderId=" + founderId +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", remark='" + remark + '\'' +
                ", founderName='" + founderName + '\'' +
                '}';
    }

    public Map<String,Object> toMap(){
        Map<String,Object> map = new HashMap<String,Object>();

        if(StringUtils.isBlank(systemName))
            map.put("systemName",this.systemName);

        if(StringUtils.isBlank(systemCode))
            map.put("systemCode",this.systemCode);

        if(StringUtils.isBlank(founderName))
            map.put("founderName",this.founderName);

        if(status!=null)
            map.put("status",this.status);

        if(founderId!=null)
            map.put("founderId",this.founderId);
        return map;
    }
}